
<!DOCTYPE html>
<html>
<head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
<!--引入bootstrap未压缩版-->
<link href="../bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- 必须先引入jQ -->
<script src="../JS/jquery-1.11.1.js"></script>
<!--包含完整的插件，或按需-->
<script src="../bootstrap/js/bootstrap.js"></script>
<title>模块报价信息平台</title>
</head>

<body>
<div class="container">


<?php
/* Demo
require_once('ftp.php');
$config = array(
   'hostname' => 'localhost',
   'username' => 'root',
   'password' => 'root',
   'port' => 21
    );
$ftp = new Ftp();
$ftp->connect($config);
$ftp->upload('ftp_err.log','ftp_upload.log');
$ftp->download('ftp_upload.log','ftp_download.log');
*/



//Dose the file have the right MIME type?
if (isset($_GET['file_name'])) {
	$file_name = $_GET['file_name'];
	require_once('../FNS/ftp_class2.php');
	$target_name = "d:\\".$file_name;
	$ftp_config = array(
		'hostname' => 'localhost',
		'username' => 'bid',
		'password' => '121121',
		'port' => 21
	);

	$ftp = new Ftp();
	$ftp->connect($ftp_config);
	
	$ftp->download($file_name,$target_name);
	
	$ftp->close();
	
	echo "<p>文件已下载至D盘根目录下。</p>";
	
}
?>

</div>
</body>
</html>